import Loadable from 'react-loadable';
import Loading from '@/components/Loading'
import PATH_MAP from '@/config/pathConstance';

const Dashboard = Loadable({ loader: () => import(/*webpackChunkName:'Dashboard'*/'@/views/dashboard'), loading: Loading });
const Error404 = Loadable({ loader: () => import(/*webpackChunkName:'Error404'*/'@/views/error/404'), loading: Loading });
const User = Loadable({ loader: () => import(/*webpackChunkName:'User'*/'@/views/user'), loading: Loading });
const Member = Loadable({ loader: () => import(/*webpackChunkName:'User'*/'@/views/member'), loading: Loading });
const About = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/about'), loading: Loading });
const VideoList = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/video/list'), loading: Loading });
const VideoCategory = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/video/category'), loading: Loading });
const VideoTag = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/video/tag'), loading: Loading });
const Apply = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/apply'), loading: Loading });
const SquareWorks = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/square/works'), loading: Loading });
const SquareList = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/square/list'), loading: Loading });
const Commission = Loadable({ loader: () => import(/*webpackChunkName:'About'*/'@/views/commission'), loading: Loading });

export default [
  {
    path: PATH_MAP.DASHBORD,
    component: Dashboard,
    // roles: ["admin", "editor", "guest"]
  },

  {
    path: PATH_MAP.USERS,
    component: User,
    // roles: ["admin"]
  },
  {
    path: PATH_MAP.MEMBER,
    component: Member,
    // roles: ["admin"]
  },
  {
    path: PATH_MAP.VIDEO_LIST,
    component: VideoList,
    // roles: ["admin"]
  },
  {
    path: PATH_MAP.VIDEO_CATEGORY,
    component: VideoCategory,
    // roles: ["admin"]
  },
  {
    path: PATH_MAP.VIDEO_TAG,
    component: VideoTag,
    // roles: ["admin"]
  },
  {
    path: PATH_MAP.APPLY,
    component: Apply
  },
  {
    path: PATH_MAP.SQUARE_WORKS,
    component: SquareWorks
  },
  {
    path: PATH_MAP.SQUARE_LIST,
    component: SquareList
  },
  {
    path: PATH_MAP.COMMISSION,
    component: Commission
  },
  {
    path: PATH_MAP.ABOUT,
    component: About,
    // roles: ["admin", "editor", "guest"]
  },
  {
    path: PATH_MAP.ERROR,
    component: Error404
  },
];
